//
//  Array.swift
//
//  Created by 李加建 on 2021/9/29
//

import Foundation

public extension Collection {
    /// 数组安全取值
    subscript(safe index: Index) -> Element? {
        indices.contains(index) ? self[index] : nil
    }
}
